﻿using System.Diagnostics;

namespace Benecura.Services.Classes.Base
{
    /// <summary>
    /// Base class of all WCF services
    /// </summary>
    public class ServiceBase
    {
        #region Constants
        protected enum LogType
        {
            Warning,
            Error,
            Fatal,
            Info
        }
        #endregion
        #region Fields
        #endregion
        #region Properties
        #endregion
        #region Class methods
        /// <summary>
        /// Errors logging
        /// </summary>
        /// <param name="message"></param>
        /// <param name="type"></param>
        protected void LogError(string message, LogType type)
        {
            string logMsg = "\r\n-\r\nClass: {0}\r\nMethod: {1}\r\nException: {2}\r\n------";
            // Get calling method name
            string method = new StackTrace().GetFrame(1).GetMethod().Name;
            switch (type)
            {
                case LogType.Fatal:

                    break;
                case LogType.Error:

                    break;
                case LogType.Warning:

                    break;
                case LogType.Info:

                    break;
            }
        }
        #endregion
    }
}